'use strict'

const express =require('express');
const adminCtrl = require('../controller/adminController.js');

let route = express.Router();

//1.0 route添加路由字符串
//route.all('/?/?',adminCtrl.admin);
//? 处自行设置，代替用户名和密码
route.all('/m/y',adminCtrl.admin);

//2.0 添加add相关路由
route.post('/add',adminCtrl.add);

//2.0 添加edit相关路由

//获取文章内容
route.get('/edit/:vid',adminCtrl.getEdit);
//更改后提交
route.post('/edit/*',adminCtrl.postEdit);

//3.0 删除数据
route.get('/del/:vid',adminCtrl.del);

//暴露route
module.exports = route;
